<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
    <title>ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <link rel="stylesheet" href="../../../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../../css/main.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../../css/github.css" type="text/css" media="screen" />
<script src="../../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../js/main.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../../js/highlight.pack.js" type="text/javascript" charset="utf-8"></script>

</head>

<body>     
    <div class="banner">
        
            <span>Ruby on Rails v4.0.0</span><br />
        
        <h1>
            <span class="type">Module</span> 
            ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID 
            
        </h1>
        <ul class="files">
            
            <li><a href="../../../../files/activerecord/lib/active_record/connection_adapters/postgresql/oid_rb.html">activerecord/lib/active_record/connection_adapters/postgresql/oid.rb</a></li>
            
        </ul>
    </div>
    <div id="bodyContent">
        <div id="content">
  


  


  
  


  
    <!-- Namespace -->
    <div class="sectiontitle">Namespace</div>
    <ul>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Array.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Array</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Bit.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Bit</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Boolean.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Boolean</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Bytea.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Bytea</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Cidr.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Cidr</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Date.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Date</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Decimal.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Decimal</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Float.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Float</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Hstore.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Hstore</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Identity.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Identity</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Integer.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Integer</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Json.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Json</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Money.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Money</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Point.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Point</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Range.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Range</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Time.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Time</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Timestamp.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Timestamp</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Type.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Type</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/TypeMap.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::TypeMap</a>
        </li>
      
        <li>
          <span class="type">CLASS</span>
          <a href="OID/Vector.html">ActiveRecord::ConnectionAdapters::PostgreSQLAdapter::OID::Vector</a>
        </li>
      
    </ul>
  


  
    <!-- Method ref -->
    <div class="sectiontitle">Methods</div>
    <dl class="methods">
      
        <dt>A</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="OID.html#method-c-alias_type">alias_type</a>
              </li>
            
          </ul>
        </dd>
      
        <dt>R</dt>
        <dd>
          <ul>
            
              
              <li>
                <a href="OID.html#method-c-register_type">register_type</a>,
              </li>
            
              
              <li>
                <a href="OID.html#method-c-registered_type-3F">registered_type?</a>
              </li>
            
          </ul>
        </dd>
      
    </dl>
  

  



  

    

    

    
      <!-- Section constants -->
      <div class="sectiontitle">Constants</div>
      <table border='0' cellpadding='5'>
        
          <tr valign='top'>
            <td class="attr-name">TYPE_MAP</td>
            <td>=</td>
            <td class="attr-value">TypeMap.new # :nodoc:</td>
          </tr>
          
            <tr valign='top'>
              <td>&nbsp;</td>
              <td colspan="2" class="attr-desc"></td>
            </tr>
          
        
          <tr valign='top'>
            <td class="attr-name">NAMES</td>
            <td>=</td>
            <td class="attr-value">Hash.new { |h,k| # :nodoc:
h[k] = OID::Identity.new
}</td>
          </tr>
          
            <tr valign='top'>
              <td>&nbsp;</td>
              <td colspan="2" class="attr-desc"><p>When the PG adapter connects, the pg_type table is queried.  The key of
this hash maps to the `typname` column from the table. TYPE_MAP is then
dynamically built with oids as the key and type objects as values.</p></td>
            </tr>
          
        
      </table>
    


    


    <!-- Methods -->
    
      <div class="sectiontitle">Class Public methods</div>
      
        <div class="method">
          <div class="title method-title" id="method-c-alias_type">
            
              <b>alias_type</b>(new, old)
            
            <a href="OID.html#method-c-alias_type" name="method-c-alias_type" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Alias the <code>old</code> type to the <code>new</code> type.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-alias_type_source')" id="l_method-c-alias_type_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/9339005bb5504839e2a868f9510f0610da657400/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb#L305" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-alias_type_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activerecord/lib/active_record/connection_adapters/postgresql/oid.rb, line 305</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">alias_type</span>(<span class="ruby-identifier">new</span>, <span class="ruby-identifier">old</span>)
  <span class="ruby-constant">NAMES</span>[<span class="ruby-identifier">new</span>] = <span class="ruby-constant">NAMES</span>[<span class="ruby-identifier">old</span>]
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-c-register_type">
            
              <b>register_type</b>(name, type)
            
            <a href="OID.html#method-c-register_type" name="method-c-register_type" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Register an <a href="OID.html">OID</a> type named <code>name</code> with a
typcasting object in <code>type</code>.  <code>name</code> should
correspond to the `typname` column in the `pg_type` table.</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-register_type_source')" id="l_method-c-register_type_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/9339005bb5504839e2a868f9510f0610da657400/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb#L300" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-register_type_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activerecord/lib/active_record/connection_adapters/postgresql/oid.rb, line 300</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">register_type</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">type</span>)
  <span class="ruby-constant">NAMES</span>[<span class="ruby-identifier">name</span>] = <span class="ruby-identifier">type</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
        
        <div class="method">
          <div class="title method-title" id="method-c-registered_type-3F">
            
              <b>registered_type?</b>(name)
            
            <a href="OID.html#method-c-registered_type-3F" name="method-c-registered_type-3F" class="permalink">Link</a>
          </div>
          
          
            <div class="description">
              <p>Is <code>name</code> a registered type?</p>
            </div>
          
          
          
          
          
            
            <div class="sourcecode">
              
              <p class="source-link">
                Source: 
                <a href="javascript:toggleSource('method-c-registered_type-3F_source')" id="l_method-c-registered_type-3F_source">show</a>
                
                  | <a href="https://github.com/rails/rails/blob/9339005bb5504839e2a868f9510f0610da657400/activerecord/lib/active_record/connection_adapters/postgresql/oid.rb#L310" target="_blank" class="github_url">on GitHub</a>
                
              </p>
              <div id="method-c-registered_type-3F_source" class="dyn-source">
                <pre><span class="ruby-comment"># File activerecord/lib/active_record/connection_adapters/postgresql/oid.rb, line 310</span>
<span class="ruby-keyword">def</span> <span class="ruby-keyword ruby-title">self</span>.<span class="ruby-identifier">registered_type?</span>(<span class="ruby-identifier">name</span>)
  <span class="ruby-constant">NAMES</span>.<span class="ruby-identifier">key?</span> <span class="ruby-identifier">name</span>
<span class="ruby-keyword">end</span></pre>
              </div>
            </div>
            
          </div>
                        </div>

    </div>
  </body>
</html>    